home *** CD-ROM | disk | FTP | other *** search
Wrap
global gRecordingIsAHit, gPlugInMixer, gPatchPlugUpInMixer, gPatchPlugDownInMixer, gPlugDestinations, sQTCharSprite, gCDName, gFileSep, gObjects, gPaletteRects, gOBJECTSD, gMixerDJAifList, gNotesPointer, gNotes, gInstrumentInCDTrack, gCDNotes, Recordtimes on resetLocCable OBJref set OBj to getaProp(gObjects, OBJref) set the castNum of sprite getaProp(OBj, #SpriteNum) to getaProp(getaProp(OBj, #cast), #left) setaProp(OBj, #DisplayState, #left) set the rect of sprite getaProp(OBj, #SpriteNum) to getaProp(OBj, #Orginalrect) end on resetLocPlug OBJref set OBj to getaProp(gObjects, OBJref) set the castNum of sprite getaProp(OBj, #SpriteNum) to getaProp(getaProp(OBj, #cast), #UN) set the loc of sprite getaProp(OBj, #SpriteNum) to getaProp(OBj, #OrginalLOC) setaProp(OBj, #DisplayState, #UN) set hole to getaProp(OBj, #HoleNum) if not voidp(hole) or (hole <> #void) then UNPluginHole(OBJref) end if end on resetIntPlug OBJref set OBj to getaProp(gObjects, OBJref) set the castNum of sprite getaProp(OBj, #SpriteNum) to getaProp(getaProp(OBj, #cast), #UN) set the loc of sprite getaProp(OBj, #SpriteNum) to getaProp(OBj, #OrginalLOC) setaProp(OBj, #DisplayState, #UN) end on PLUGinHoleIntrument OBJref set OBj to getaProp(gObjects, OBJref) set cableref to getaProp(getaProp(OBj, #CABLE), #RefName) set hole to getaProp(OBj, #HoleNum) if voidp(hole) or (hole = #void) then resetIntPlug(OBJref) resetLocCable(cableref) updateStage() else set Mobj to getaProp(gObjects, getAt(getaProp(getaProp(gObjects, #MIXER), #MusicBars), getaProp(OBj, #HoleNum))) set IOBJ to getaProp(gObjects, getAt(getaProp(getaProp(gObjects, #MIXER), #IntBars), getaProp(OBj, #HoleNum))) set Monitor to getaProp(gObjects, getaProp(getaProp(getaProp(gObjects, #MIXER), #monitors), getaProp(OBj, #INTRument))) set the castNum of sprite getaProp(Mobj, #SpriteNum) to getaProp(getaProp(Mobj, #cast), getaProp(Monitor, #DisplayState)) set the castNum of sprite getaProp(IOBJ, #SpriteNum) to getaProp(getaProp(IOBJ, #cast), getaProp(OBj, #INTRument)) end if set ObjrefList to [OBJref, cableref] repeat with ref in ObjrefList DynamicLOCRECT(ref) end repeat end on IntruDetails repeat with X = 1 to 4 set INTRU to getAt(getaProp(getaProp(getaProp(getaProp(gObjects, #MIXER), #Patchlist), #INSin), #Filled), X) if INTRU <> 0 then set OBj to getaProp(gObjects, INTRU) set Mobj to getaProp(gObjects, getAt(getaProp(getaProp(gObjects, #MIXER), #MusicBars), X)) set IOBJ to getaProp(gObjects, getAt(getaProp(getaProp(gObjects, #MIXER), #IntBars), X)) set Monitor to getaProp(gObjects, getaProp(getaProp(getaProp(gObjects, #MIXER), #monitors), getaProp(OBj, #INTRument))) set the castNum of sprite getaProp(Mobj, #SpriteNum) to getaProp(getaProp(Mobj, #cast), getaProp(Monitor, #DisplayState)) set the castNum of sprite getaProp(IOBJ, #SpriteNum) to getaProp(getaProp(IOBJ, #cast), getaProp(OBj, #INTRument)) end if end repeat end on PluginHoleMixin OBJref set OBj to getaProp(gObjects, OBJref) set Parentref to getaProp(OBj, #Parent) set cableref to getaProp(getaProp(OBj, #CABLE), #RefName) set hole to getaProp(OBj, #HoleNum) if voidp(hole) or (hole = #void) then resetLocPlug(OBJref) resetLocPlug(Parentref) resetLocCable(cableref) updateStage() else end if set ObjrefList to [OBJref, cableref, Parentref] repeat with ref in ObjrefList DynamicLOCRECT(ref) end repeat end on PluginHoleMixout OBJref set OBj to getaProp(gObjects, OBJref) set Childplugref to getaProp(OBj, #ChildPlug) set cableref to getaProp(getaProp(OBj, #CABLE), #RefName) set hole to getaProp(OBj, #HoleNum) if voidp(hole) or (hole = #void) then resetLocPlug(OBJref) resetLocPlug(Childplugref) resetLocCable(cableref) updateStage() else end if set ObjrefList to [OBJref, cableref, Childplugref] repeat with ref in ObjrefList DynamicLOCRECT(ref) end repeat end on GrabPlugIntro OBJref set H to the mouseH set V to the mouseV set OBj to getaProp(gObjects, OBJref) set INTR to getaProp(gObjects, getaProp(OBj, #INTRument)) set cableref to getaProp(getaProp(OBj, #CABLE), #RefName) set Anchor to getaProp(getaProp(gObjects, cableref), #Anchor) cursor(getaProp(gCursorlist, #Grab)) set the castNum of sprite getaProp(OBj, #SpriteNum) to getaProp(getaProp(OBj, #cast), #UN) set arect to rect(the locH of sprite getaProp(OBj, #SpriteNum), the locV of sprite getaProp(OBj, #SpriteNum), the locH of Anchor, the locV of Anchor) CableUpdate(cableref, arect) updateStage() MakeDynamic(cableref, #DisplayState, getaProp(getaProp(gObjects, cableref), #DisplayState)) set hole to getaProp(OBj, #HoleNum) if not voidp(hole) and (hole <> #void) then set Mobj to getaProp(gObjects, getAt(getaProp(getaProp(gObjects, #MIXER), #MusicBars), getaProp(OBj, #HoleNum))) set IOBJ to getaProp(gObjects, getAt(getaProp(getaProp(gObjects, #MIXER), #IntBars), getaProp(OBj, #HoleNum))) set the castNum of sprite getaProp(Mobj, #SpriteNum) to getaProp(getaProp(Mobj, #cast), #UN) set the castNum of sprite getaProp(IOBJ, #SpriteNum) to getaProp(getaProp(IOBJ, #cast), #UN) end if UNPluginHole(OBJref) PLugDRAGCable(OBJref, getaProp(getaProp(OBj, #CABLE), #RefName), Anchor, H, V) if PluginHole(OBJref) = #true then MakeDynamic(getaProp(INTR, #RefName), #PlugInMixer, #true) else MakeDynamic(getaProp(INTR, #RefName), #PlugInMixer, #false) end if if not voidp(getaProp(getaProp(OBj, #Action), #UP)) then do(getaProp(getaProp(OBj, #Action), #UP)) end if end on GrabPlugMixin OBJref set H to the mouseH set V to the mouseV set OBj to getaProp(gObjects, OBJref) set cableref to getaProp(getaProp(OBj, #CABLE), #RefName) set Anchor to the loc of sprite getaProp(getaProp(gObjects, getaProp(OBj, #Parent)), #SpriteNum) cursor(getaProp(gCursorlist, #Grab)) set the castNum of sprite getaProp(OBj, #SpriteNum) to getaProp(getaProp(OBj, #cast), #UN) set arect to rect(the locH of sprite getaProp(OBj, #SpriteNum), the locV of sprite getaProp(OBj, #SpriteNum), the locH of Anchor, the locV of Anchor) CableUpdate(cableref, arect) updateStage() MakeDynamic(cableref, #DisplayState, getaProp(getaProp(gObjects, cableref), #DisplayState)) UNPluginHole(OBJref) PLugDRAGCable(OBJref, cableref, Anchor, H, V) if PluginHole(OBJref) = #true then end if if not voidp(getaProp(getaProp(OBj, #Action), #UP)) then do(getaProp(getaProp(OBj, #Action), #UP)) end if end on GrabPlugMixout OBJref set H to the mouseH set V to the mouseV set OBj to getaProp(gObjects, OBJref) set cableref to getaProp(getaProp(OBj, #CABLE), #RefName) set Anchor to the loc of sprite getaProp(getaProp(gObjects, getaProp(OBj, #ChildPlug)), #SpriteNum) cursor(getaProp(gCursorlist, #Grab)) set the castNum of sprite getaProp(OBj, #SpriteNum) to getaProp(getaProp(OBj, #cast), #UN) set arect to rect(the locH of sprite getaProp(OBj, #SpriteNum), the locV of sprite getaProp(OBj, #SpriteNum), the locH of Anchor, the locV of Anchor) CableUpdate(cableref, arect) updateStage() MakeDynamic(cableref, #DisplayState, getaProp(getaProp(gObjects, cableref), #DisplayState)) UNPluginHole(OBJref) PLugDRAGCable(OBJref, cableref, Anchor, H, V) if PluginHole(OBJref) = #true then end if if not voidp(getaProp(getaProp(OBj, #Action), #UP)) then do(getaProp(getaProp(OBj, #Action), #UP)) end if end on CheckIntruPatch set INTRU to getaProp(getaProp(getaProp(getaProp(gObjects, #MIXER), #Patchlist), #INSin), #Filled) if getOne(INTRU, 0) = 0 then MakeDynamic(#MIXER, #IntruPatched, #true) return #true else MakeDynamic(#MIXER, #IntruPatched, #false) return #false end if end on CheckPlayRecord set INs to getaProp(getaProp(getaProp(getaProp(gObjects, #MIXER), #Patchlist), #Mixin), #Filled) set Outs to getaProp(getaProp(getaProp(getaProp(gObjects, #MIXER), #Patchlist), #MixOut), #Filled) set INTRU to getaProp(getaProp(getaProp(getaProp(gObjects, #MIXER), #Patchlist), #INSin), #Filled) set Patchlist to [] repeat with NUM = 1 to 4 if getAt(Outs, NUM) <> 0 then if getOne(INs, getaProp(getaProp(gObjects, getAt(Outs, NUM)), #ChildPlug)) <> 0 then if getAt(INTRU, NUM) <> 0 then if getaProp(gNotes, getaProp(getaProp(gObjects, getAt(INTRU, NUM)), #INTRument)) <> [] then add(Patchlist, getaProp(getaProp(gObjects, getAt(INTRU, NUM)), #INTRument)) end if end if end if end if end repeat if Patchlist <> [] then return Patchlist else return #false if voidp(Recordtimes) then set Recordtimes to 1 else PDARelease("J04m13p.mov") end if end if end on CheckPlayClearChannel OBJref set OBj to getaProp(gObjects, OBJref) set NUM to getaProp(OBj, #NUM) set INs to getaProp(getaProp(getaProp(getaProp(gObjects, #MIXER), #Patchlist), #Mixin), #Filled) set Outs to getaProp(getaProp(getaProp(getaProp(gObjects, #MIXER), #Patchlist), #MixOut), #Filled) set INTRU to getaProp(getaProp(getaProp(getaProp(gObjects, #MIXER), #Patchlist), #INSin), #Filled) set INTRument to #false if getAt(Outs, NUM) <> 0 then set ChildPlug to getaProp(getaProp(gObjects, getAt(Outs, NUM)), #ChildPlug) if getOne(INs, ChildPlug) <> 0 then if getAt(INTRU, NUM) <> 0 then set INTRument to getaProp(getaProp(gObjects, getAt(INTRU, NUM)), #INTRument) end if end if end if return INTRument end on CheckClearMixChannel OBJref set OBj to getaProp(gObjects, OBJref) set NUM to getaProp(OBj, #NUM) set INs to getAt(getaProp(getaProp(getaProp(getaProp(gObjects, #MIXER), #Patchlist), #Mixin), #Filled), NUM) set Outs to getAt(getaProp(getaProp(getaProp(getaProp(gObjects, #MIXER), #Patchlist), #MixOut), #Filled), NUM) if (getOne(INs, 0) = 0) and (getOne(Outs, 0) = 0) then return #true else return #false end if end on PluginHole OBJref set OBj to getaProp(gObjects, OBJref) set HoleFilled to CheckOpenHole(OBJref) if HoleFilled = #false then return #false end if set PlugType to getaProp(OBj, #PlugType) set HOLES to getaProp(getaProp(getaProp(gObjects, #MIXER), #Patchlist), PlugType) set Filled to getaProp(HOLES, #Filled) playSound(getaProp(getaProp(OBj, #sound), #Plug), #cast) set the castNum of sprite getaProp(OBj, #SpriteNum) to getaProp(getaProp(OBj, #cast), #Pluged) set the loc of sprite getaProp(OBj, #SpriteNum) to getAt(getaProp(HOLES, #loc), HoleFilled) updateStage() setaProp(OBj, #DisplayState, #Pluged) setAt(Filled, HoleFilled, OBJref) setaProp(OBj, #HoleNum, HoleFilled) MakeDynamic(OBJref, #DisplayState, getaProp(OBj, #DisplayState)) return #true end on UNPluginHole OBJref set OBj to getaProp(gObjects, OBJref) StopPlayMixer() set hole to getaProp(OBj, #HoleNum) if voidp(hole) or (hole = #void) then exit end if set PlugType to getaProp(OBj, #PlugType) set HOLES to getaProp(getaProp(getaProp(gObjects, #MIXER), #Patchlist), PlugType) set Filled to getaProp(HOLES, #Filled) setAt(Filled, getaProp(OBj, #HoleNum), 0) MakeDynamic(getaProp(OBj, #RefName), #HoleNum, #void) end on CheckOpenHole OBJref set OBj to getaProp(gObjects, OBJref) set PlugType to getaProp(OBj, #PlugType) set HOLES to getaProp(getaProp(getaProp(gObjects, #MIXER), #Patchlist), PlugType) set Slots to getaProp(HOLES, #Slots) set Filled to getaProp(HOLES, #Filled) set C to count(Slots) repeat with R = 1 to C if inside(the loc of sprite getaProp(OBj, #SpriteNum), getAt(Slots, R)) then if getAt(Filled, R) = 0 then return R next repeat end if return #false end if end repeat return #false end on GrabPullAll OBJref set H to the mouseH set V to the mouseV set OBj to getaProp(gObjects, OBJref) set SpriteList to [[#SpriteNum: getaProp(OBj, #SpriteNum), #OffsetH: H - the locH of sprite getaProp(OBj, #SpriteNum), #OffsetV: V - the locV of sprite getaProp(OBj, #SpriteNum)]] set ObjrefList to [OBJref] repeat with C in getaProp(OBj, #Children) set O to getaProp(gObjects, C) add(ObjrefList, C) add(SpriteList, [#SpriteNum: getaProp(O, #SpriteNum), #OffsetH: H - the locH of sprite getaProp(O, #SpriteNum), #OffsetV: V - the locV of sprite getaProp(O, #SpriteNum)]) end repeat set OBJcount to count(ObjrefList) if not voidp(getaProp(getaProp(OBj, #sound), #down)) then playSound(getaProp(getaProp(OBj, #sound), #down), #keyframeCast) end if updateStage() repeat while the mouseDown repeat with Snum in SpriteList set the locV of sprite getaProp(Snum, #SpriteNum) to V - getaProp(Snum, #OffsetV) set the locH of sprite getaProp(Snum, #SpriteNum) to H - getaProp(Snum, #OffsetH) end repeat CursorandUpdate() set H to the mouseH set V to the mouseV end repeat if not voidp(getaProp(getaProp(OBj, #sound), #UP)) then playSound(getaProp(getaProp(OBj, #sound), #UP), #keyframeCast) end if updateStage() cursor(getaProp(gCursorlist, #Hand)) updateStage() end on PLugDRAGCable OBJref, cableref, Anchor, H, V set OBj to getaProp(gObjects, OBJref) set CABLE to getaProp(gObjects, cableref) set OffsetH to H - the locH of sprite getaProp(OBj, #SpriteNum) set OffsetV to V - the locV of sprite getaProp(OBj, #SpriteNum) if not voidp(getaProp(getaProp(OBj, #sound), #down)) then playSound(getaProp(getaProp(OBj, #sound), #down), #keyframeCast) end if repeat while the mouseDown set the locV of sprite getaProp(OBj, #SpriteNum) to V - OffsetV set the locH of sprite getaProp(OBj, #SpriteNum) to H - OffsetH set arect to rect(the locH of sprite getaProp(OBj, #SpriteNum), the locV of sprite getaProp(OBj, #SpriteNum), the locH of Anchor, the locV of Anchor) CableUpdate(cableref, arect) CursorandUpdate() set H to the mouseH set V to the mouseV end repeat MakeDynamic(cableref, #DisplayState, getaProp(getaProp(gObjects, cableref), #DisplayState)) cursor(getaProp(gCursorlist, #Hand)) if not voidp(getaProp(getaProp(OBj, #sound), #UP)) then playSound(getaProp(getaProp(OBj, #sound), #UP), #keyframeCast) end if end on DetermineLine L, T, R, B if (L < R) and (T > B) then return #right else if (L > R) and (T > B) then return #left else if (L < R) and (T < B) then return #left else if (L > R) and (T < B) then return #right end if end if end if end if return #false end on DJFeedback Kind if Kind = #random then set firstBadRecord to getaProp(getaProp(gObjects, #REcordPlayMixer), #firstBadRecord) if voidp(firstBadRecord) then set fileName to "D07DJb1.aif" MakeDynamic(#REcordPlayMixer, #firstBadRecord, 1) else set DJSound to [#ran1: "D07DJb9.aif", #ran3: "D07DJb10.aif", #ran4: "D07DJb12.aif", #ran5: "D07DJb14.aif", #ran6: "D07DJb15.aif", #ran7: "D07DJb16.aif", #ran9: "D07DJht4.aif"] set C to count(DJSound) set fileName to getAt(DJSound, random(C)) end if else if Kind = #help1 then set fileName to "D22DJgd4.aif" else if Kind = #help2 then set fileName to "D22DJgd5.aif" end if end if end if playSound(fileName, #File, 1) end on StopPlayMixer stopPlayAllTracks() set the castNum of sprite getaProp(getaProp(gObjects, #REcordPlayMixer), #SpriteNum) to getaProp(getaProp(getaProp(gObjects, #REcordPlayMixer), #cast), #UN) set the castNum of sprite getaProp(getaProp(gObjects, #PlayClearStatus), #SpriteNum) to getaProp(getaProp(getaProp(gObjects, #PlayClearStatus), #cast), #UN) end on PlayClearPlay OBJref StopPlayMixer() set OBj to getaProp(gObjects, OBJref) set PAR to getaProp(gObjects, getaProp(OBj, #Parent)) set NUM to getaProp(OBj, #NUM) set the castNum of sprite getaProp(PAR, #SpriteNum) to getAt(getaProp(getaProp(PAR, #cast), #play), NUM) updateStage() set PlayThis to CheckPlayClearChannel(OBJref) if PlayThis <> #false then playOneTrack(PlayThis, "StopPlayMixer") else end if end on PlayClearClear OBJref StopPlayMixer() set OBj to getaProp(gObjects, OBJref) set PAR to getaProp(gObjects, getaProp(OBj, #Parent)) set NUM to getaProp(OBj, #NUM) set the castNum of sprite getaProp(PAR, #SpriteNum) to getAt(getaProp(getaProp(PAR, #cast), #Clear), NUM) updateStage() set PlayThis to CheckPlayClearChannel(OBJref) if PlayThis <> #false then eraseRecording(PlayThis) else end if set the castNum of sprite getaProp(PAR, #SpriteNum) to getaProp(getaProp(PAR, #cast), #UN) updateStage() end on PlayMixer OBJref StopPlayMixer() set OBj to getaProp(gObjects, OBJref) set the castNum of sprite getaProp(getaProp(gObjects, #REcordPlayMixer), #SpriteNum) to getaProp(getaProp(getaProp(gObjects, #REcordPlayMixer), #cast), #play) updateStage() set Playlist to CheckPlayRecord() if Playlist <> #false then playAllRecordedTracksOrCD(gNotes, Playlist, "StopPlayMixer") else set the castNum of sprite getaProp(getaProp(gObjects, #REcordPlayMixer), #SpriteNum) to getaProp(getaProp(getaProp(gObjects, #REcordPlayMixer), #cast), #UN) end if end on RecordMixer OBJref StopPlayMixer() set the castNum of sprite getaProp(getaProp(gObjects, #REcordPlayMixer), #SpriteNum) to getaProp(getaProp(getaProp(gObjects, #REcordPlayMixer), #cast), #Record) updateStage() if getaProp(getaProp(gObjects, #DJVid), #newhit) <> #enter then exit end if set OBj to getaProp(gObjects, OBJref) set NOTgood to #false set Playlist to CheckPlayRecord() if Playlist <> #false then if count(Playlist) <> 4 then set NOTgood to #true DJFeedback(#random) else set monitorNum to getaProp(getaProp(gObjects, getaProp(getaProp(gObjects, getAt(Playlist, 1)), #Monitor)), #DisplayState) repeat with INTRument in Playlist set int to getaProp(gObjects, INTRument) if (getaProp(int, #State) <> #Chaotic) or (count(getaProp(gNotes, INTRument)) = 0) or (getaProp(getaProp(gObjects, getaProp(int, #Monitor)), #DisplayState) <> monitorNum) then set NOTgood to #true DJFeedback(#random) exit repeat end if end repeat if NOTgood = #false then set gCDNotes to [:] repeat with INTRument in Playlist setaProp(gCDNotes, INTRument, value(string(getaProp(gNotes, INTRument)))) end repeat TheCDGIVE() SetDJSTATE() genexitkf(#D07) exit end if end if else set NOTgood to #true DJFeedback(#random) end if set clickRecordtimesNow to getaProp(getaProp(gObjects, #REcordPlayMixer), #clickRecordtimes) if voidp(clickRecordtimesNow) then PDARelease("J04m13p.mov") MakeDynamic(#REcordPlayMixer, #clickRecordtimes, 1) end if set the castNum of sprite getaProp(getaProp(gObjects, #REcordPlayMixer), #SpriteNum) to getaProp(getaProp(getaProp(gObjects, #REcordPlayMixer), #cast), #UN) updateStage() end on SetDJSTATE setaProp(getaProp(gStates, #Conditions), #radioStation, getaProp(getaProp(gStates, #Conditions), #radioStation) + 1) MakeDynamic(#DJVid, #newhit, #true) end on TheCDGIVE playSound("D22FXejt.aif", #keyframeCast) set CDobj to getaProp(gObjects, #CDobj) set Make to getaProp(gObjects, #MakeCDmixer) set the loc of sprite getaProp(CDobj, #SpriteNum) to getaProp(Make, #loc) repeat with CDcast in getaProp(getaProp(Make, #cast), #FrameData) set the castNum of sprite getaProp(CDobj, #SpriteNum) to CDcast CursorandUpdate() end repeat set the loc of sprite getaProp(CDobj, #SpriteNum) to getaProp(CDobj, #loc) set the castNum of sprite getaProp(CDobj, #SpriteNum) to getAt(getaProp(getaProp(CDobj, #cast), #UP), 1) ReleaseUNVobject(#CDobj) end on PlaynewSong name set the movieRate of sprite sQTCharSprite to 0 updateStage() set PATH to gCDName & "DATA" & gFileSep & "D_enviro" & gFileSep & "D_char" & gFileSep set the fileName of cast the castNum of sprite sQTCharSprite to string(PATH & name) setSoundVolumes() updateStage() set the movieTime of sprite sQTCharSprite to 0 set the movieRate of sprite sQTCharSprite to 1 end on playJukeBox OBJref set OBj to getaProp(gObjects, OBJref) set songNum to getaProp(OBj, #songNum) set qtSongObj to getaProp(gObjects, #JukeBoxQTSong) set qtSongSprite to getaProp(qtSongObj, #SpriteNum) PlaynewSong(getaProp(getaProp(qtSongObj, #cast), songNum)) end on GetOutOfC genexitkf(#d01) end on EnterD13 AddObjects([#exitD]) end on stopJukeBoxSong set the loop of cast the castNum of sprite sQTCharSprite to 0 end on exitd11 set the loop of cast the castNum of sprite sQTCharSprite to 0 set PATH to gCDName & "DATA" & gFileSep & "D_enviro" & gFileSep & "D_char" & gFileSep set the fileName of cast the castNum of sprite sQTCharSprite to PATH & "QTDummy.mov" openMIDIXObjOut() end on enterd11 closeMIDIXObjOut() end on monitorClick OBJref set OBj to getaProp(gObjects, OBJref) set IntroObj to getaProp(OBj, #Parent) set thestate to getaProp(OBj, #DisplayState) + 1 if thestate > 4 then set thestate to 1 end if set the castNum of sprite getaProp(OBj, #SpriteNum) to getaProp(getaProp(OBj, #cast), thestate) updateStage() MakeDynamic(OBJref, #DisplayState, thestate) end